/* 
 * File:   PsoInertiaUpdateMethods.h
 * Author: jcrada
 *
 * Created on April 8, 2009, 9:49 PM
 */

#ifndef _PSOINERTIAUPDATEMETHODS_H
#define	_PSOINERTIAUPDATEMETHODS_H

#include "PsoOperators.h"

#include "PsoModel.h"
#include "PsoParticle.h"

namespace jcrada {

    class LinearDecreasingInertia : public PsoInertiaUpdateMethod {
    private:
        int _max_iterations;

    public:
        LinearDecreasingInertia( int max_iterations );
        virtual void updateInertia( PsoParticle& particle, const PsoModel& model );

        virtual int getMaxIterations( ) const {
            return this->_max_iterations;
        }
    };

    class NonLinearDecreasingInertia : public PsoInertiaUpdateMethod {
    private:
        int _max_iterations;
    public:
        NonLinearDecreasingInertia( int max_iterations );
        virtual void updateInertia( PsoParticle& particle, const PsoModel& model );

        virtual int getMaxIterations( ) const {
            return this->_max_iterations;
        }
    };

    //    class RelativeImprovementInertia : public PsoInertiaUpdateMethod {
    //    public:
    //        virtual void updateInertia( PsoParticle& particle, const PsoModel& model );
    //    };
}

#endif	/* _PSOINERTIAUPDATEMETHODS_H */

